<div class="zipcodes view">
<h2><?php  __('Zipcode');?></h2>
	<dl><?php $i = 0; $class = ' class="altrow"';?>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Id'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $zipcode['Zipcode']['id']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Zipcode'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $zipcode['Zipcode']['zipcode']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Latitude'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $zipcode['Zipcode']['latitude']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Longitude'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $zipcode['Zipcode']['longitude']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('City'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $zipcode['Zipcode']['city']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('State'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $this->Html->link($zipcode['State']['id'], array('controller' => 'states', 'action' => 'view', $zipcode['State']['id'])); ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Zipcode Class'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $this->Html->link($zipcode['ZipcodeClass']['id'], array('controller' => 'zipcode_classes', 'action' => 'view', $zipcode['ZipcodeClass']['id'])); ?>
			&nbsp;
		</dd>
	</dl>
</div>
<div class="actions">
	<h3><?php __('Actions'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('Edit Zipcode', true), array('action' => 'edit', $zipcode['Zipcode']['id'])); ?> </li>
		<li><?php echo $this->Html->link(__('Delete Zipcode', true), array('action' => 'delete', $zipcode['Zipcode']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $zipcode['Zipcode']['id'])); ?> </li>
		<li><?php echo $this->Html->link(__('List Zipcodes', true), array('action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Zipcode', true), array('action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List States', true), array('controller' => 'states', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New State', true), array('controller' => 'states', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Zipcode Classes', true), array('controller' => 'zipcode_classes', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Zipcode Class', true), array('controller' => 'zipcode_classes', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Locations', true), array('controller' => 'locations', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Location', true), array('controller' => 'locations', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Vendor Locations', true), array('controller' => 'vendor_locations', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Vendor Location', true), array('controller' => 'vendor_locations', 'action' => 'add')); ?> </li>
	</ul>
</div>
<div class="related">
	<h3><?php __('Related Locations');?></h3>
	<?php if (!empty($zipcode['Location'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __('Id'); ?></th>
		<th><?php __('Location Name'); ?></th>
		<th><?php __('Location Address'); ?></th>
		<th><?php __('Zipcode Id'); ?></th>
		<th><?php __('Location Note'); ?></th>
		<th><?php __('Gps Latitude'); ?></th>
		<th><?php __('Gps Longitude'); ?></th>
		<th><?php __('Created'); ?></th>
		<th><?php __('Modified'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($zipcode['Location'] as $location):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $location['id'];?></td>
			<td><?php echo $location['location_name'];?></td>
			<td><?php echo $location['location_address'];?></td>
			<td><?php echo $location['zipcode_id'];?></td>
			<td><?php echo $location['location_note'];?></td>
			<td><?php echo $location['gps_latitude'];?></td>
			<td><?php echo $location['gps_longitude'];?></td>
			<td><?php echo $location['created'];?></td>
			<td><?php echo $location['modified'];?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View', true), array('controller' => 'locations', 'action' => 'view', $location['id'])); ?>
				<?php echo $this->Html->link(__('Edit', true), array('controller' => 'locations', 'action' => 'edit', $location['id'])); ?>
				<?php echo $this->Html->link(__('Delete', true), array('controller' => 'locations', 'action' => 'delete', $location['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $location['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('New Location', true), array('controller' => 'locations', 'action' => 'add'));?> </li>
		</ul>
	</div>
</div>
<div class="related">
	<h3><?php __('Related Vendor Locations');?></h3>
	<?php if (!empty($zipcode['VendorLocation'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __('Id'); ?></th>
		<th><?php __('Ext Location'); ?></th>
		<th><?php __('Street Address'); ?></th>
		<th><?php __('Zipcode Id'); ?></th>
		<th><?php __('Vendor Id'); ?></th>
		<th><?php __('Email'); ?></th>
		<th><?php __('Vendor Location Note'); ?></th>
		<th><?php __('Vendor Location Lead Min'); ?></th>
		<th><?php __('Allow Preorder'); ?></th>
		<th><?php __('Allow Delivery'); ?></th>
		<th><?php __('Allow Carryout'); ?></th>
		<th><?php __('Menu Id'); ?></th>
		<th><?php __('Gps Latitude'); ?></th>
		<th><?php __('Gps Longitude'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($zipcode['VendorLocation'] as $vendorLocation):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $vendorLocation['id'];?></td>
			<td><?php echo $vendorLocation['ext_location'];?></td>
			<td><?php echo $vendorLocation['street_address'];?></td>
			<td><?php echo $vendorLocation['zipcode_id'];?></td>
			<td><?php echo $vendorLocation['vendor_id'];?></td>
			<td><?php echo $vendorLocation['email'];?></td>
			<td><?php echo $vendorLocation['vendor_location_note'];?></td>
			<td><?php echo $vendorLocation['vendor_location_lead_min'];?></td>
			<td><?php echo $vendorLocation['allow_preorder'];?></td>
			<td><?php echo $vendorLocation['allow_delivery'];?></td>
			<td><?php echo $vendorLocation['allow_carryout'];?></td>
			<td><?php echo $vendorLocation['menu_id'];?></td>
			<td><?php echo $vendorLocation['gps_latitude'];?></td>
			<td><?php echo $vendorLocation['gps_longitude'];?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View', true), array('controller' => 'vendor_locations', 'action' => 'view', $vendorLocation['id'])); ?>
				<?php echo $this->Html->link(__('Edit', true), array('controller' => 'vendor_locations', 'action' => 'edit', $vendorLocation['id'])); ?>
				<?php echo $this->Html->link(__('Delete', true), array('controller' => 'vendor_locations', 'action' => 'delete', $vendorLocation['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $vendorLocation['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('New Vendor Location', true), array('controller' => 'vendor_locations', 'action' => 'add'));?> </li>
		</ul>
	</div>
</div>
